<template>
	<!-- 商铺营业资质 -->
	<view class="container">
		<view class="model-box">
			<view class="item">
				<text class="label">店铺名称：</text>
				<text class="value">{{data.seller_name}}</text>
			</view>
			<!-- <view class="item">
				<text class="label">法定代表人：</text>
				<text class="value">{{data.seller_name}}</text>
			</view> -->
			<view class="item">
				<text class="label">经营地址：</text>
				<text class="value">{{data.address}}</text>
			</view>
			<view class="item">
				<text class="label">经营范围：</text>
				<text class="value">{{data.cate_name}}</text>
			</view>
			<!-- <view class="item">
				<text class="label">有效期至：</text>
				<text class="value">{{data.seller_name}}</text>
			</view> -->
		</view>
		<view class="model-box" v-if="data.business_license||quarantine_report.length!=0">
			<view class="title">
				店铺资质信息公示
			</view>
			<image :src="data.business_license" mode="widthFix"></image>
			<block v-for="(item,index) in quarantine_report" :key="index">
				<image  @tap="preImage(index)" :src="item" mode="widthFix"></image>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				data: {},
				quarantine_report: []
			}
		},
		onLoad(opt) {
			this.data = JSON.parse(decodeURIComponent(opt.item));
			this.data.quarantine_report.split('"').forEach((val,index)=>{
				if(val.length > 2){
					val = val.replace(/\\\//g,'/')
					this.quarantine_report.push(val)
				}
			})
		},
		methods: {
			preImage(index){
				uni.previewImage({
					current: index,
					urls: this.quarantine_report,
					loop: true
				})
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	page{
		
	}
	.container{
		background-color: #FAFAFA;
		height: 100vh;
		padding: 0;
		.model-box{
			line-height: 70rpx;
			padding: 30rpx;
			background-color: #fff;
			width: 91%;
			margin: 0 auto;
			box-sizing: border-box;

			border-top: 30rpx solid #FAFAFA;
			.title{
				margin-bottom: 30rpx;
			}
			image{
				border: 1rpx solid #f5f5f5;
				width: 100%;
			}
		}
		.item{
			display: flex;
			.label{
				min-width: 130rpx;
				font-size:24rpx;
				color:rgba(153,153,153,1);
				margin-right: 40rpx;
			}
			.value{
				font-size:28rpx;
				color:rgba(51,51,51,1);
			}
		}
	}
	
</style>
